<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script type="text/javascript">
	$(function() {
		var $grid = $('#grid_class_manage');
		var $title = '班级';
		var $baseUrl = 'student/class';
		$grid.datagrid({
			title : $title + '列表',
			url : $baseUrl + '/page?sort=name',
			idField : 'id',
			fitColumns:true,
			striped : true,
			pagination : true,
			pageSize : 50,
			pageList : [ 50, 100, 200 ],
			dialog : {
				url : $baseUrl,
				name : $title,
				search : {
					width : 500,
					height : 320,
					name : '查询',
					url : 'search',
					buttons : [ $.dialog.buttons.search,$.dialog.buttons.reset, $.dialog.buttons.close ]
				},
				create : {
					width : 500,
					height : 420
				},
				update : {
					width : 500,
					height : 420
				}
			},
			columns : [ [ {
				field : 'id',
				title : '编号',
				width : 250,
				hidden : true
			}, {
				field : 'name',
				title : '班级名称',
				width : 200
			},{
				field : 'year',
				title : '入学年',
				width : 200
			},{
				field : 'parentdept',
				title : '所属部门',
				width : 200,
				formatter : function(value,row){
					return value==undefined?'':value.name;
				}
			},{
				field : 'manager',
				title : '班主任',
				formatter : function(value,row){
					return value==undefined?'':value.cade.name;
				},
				width : 200
			},{
				field : 'content',
				title : '备注',
				width : 400
			},{
				field : 'isUsed',
				title : '是否在校',
				width : 200,
				formatter : function(value,row){
					return value==true?'是':'否';
				}
			}] ],
			toolbar : [$.crudgrid.buttons.create,$.crudgrid.buttons.update,$.crudgrid.buttons.remove, $.crudgrid.buttons.search,'-',$.crudgrid.buttons.clearSearch, '-', $.crudgrid.buttons.refresh,'-' ]
		});

	});
</script>
<table id="grid_class_manage">

</table>